package com.lock.immersive.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lock.immersive.pojo.domain.ProductItem;
import com.lock.immersive.pojo.vo.ProductPriceVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ProductItemMapper extends BaseMapper<ProductItem> {
    @Select("select * from product_item where product_id = #{productId}")
    List<ProductItem> getProductItemByProductId(@Param("productId") Integer productId);
    @Select("select  max(item_price) as maxPrice,min(item_price) as minPrice from product_item where product_id = #{productId}")
    ProductPriceVo getProductPrice(@Param("productId") Integer productId);
}
